/** 获取url参数
 * @param key 参数名
 * @returns 参数值
 * @example url: http://127.0.0.1:8000?key=app
 * const key = getUrlParmeter('key') // 'app'
 */
export default (key: string) => {
  const urlSearch = new URLSearchParams(window.location.search);
  return urlSearch.get(key);
}
